/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package beans;

import java.util.HashMap;
import java.util.Iterator;

/**
 *
 * @author GOSTEP
 */
public class LoginDetail {
    static HashMap<String, String> login=new HashMap<String, String>();


    public static boolean isUsername(String user){
        boolean result=false;
         Iterator it=login.keySet().iterator();
            while(it.hasNext()){
                 String s=(String)it.next();
                 if(s.equalsIgnoreCase(user)){
                     result=true;
                 }
            }
        return result;
    }
    public static void registerUser(String username, String password){
        login.put(username, password);
    }

    public static String getUser(String username){
        String u=login.get(username);
        return u;
    }


}
